import os
import sys

dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
sys.path.insert(0, dir)

from tornado import ioloop
from tornado import httpserver

from application import Application
from tornado import options

options.define('port', default=8001, type=int)
options.define('app', default='mall_8000.log', type=str)

if __name__ == '__main__':
    options.options.parse_command_line()
    server = httpserver.HTTPServer(Application())
    server.listen(options.options.port)
    ioloop.IOLoop.current().start()
